﻿using System;
using System.Collections.Generic;
using System.Text;
using Hkwl.WorldExpo.Merchant.Model;
using Hkwl.WorldExpo.Merchant.DataAccess;

namespace Hkwl.WorldExpo.Merchant.Service.Impl
{
    public class ProjectServiceImpl : IProjectService
    {

        private IProjectDao infoDao;

        public ProjectServiceImpl(IProjectDao infoDao)
        {
            this.infoDao = infoDao;
        }

        #region NxProject 对象

        public NxProject GetNxProjectById(int projectId)
        {
            return infoDao.GetNxProjectById(projectId);
        }

        public int GetNxProjectByName(string projectName, int merchantId)
        {
            return infoDao.GetNxProjectByName(projectName, merchantId);
        }

        public bool InsertNxProject(NxProject project)
        {
            return infoDao.InsertNxProject(project);
        }

        public bool UpdateNxProject(NxProject project)
        {
            return infoDao.UpdateNxProject(project);
        }

        public bool DeleteNxProject(int projectId)
        {
            return infoDao.DeleteNxProject(projectId);
        }

        public IList<NxProject> GetNxProjectCollection(int merchantId, int pageIndex, int pageSize, ref int count)
        {
            return infoDao.GetNxProjectCollection(merchantId, pageIndex, pageSize, ref count);
        }

        public IList<NxProject> GetNxProjectCollectionByStatus(int merchantId, int status, int pageIndex, int pageSize, ref int count)
        {
            return infoDao.GetNxProjectCollectionByStatus(merchantId, status, pageIndex, pageSize, ref count);
        }
        #endregion

        #region NxMms 对象

        public bool InsertNxMms(NxMms mms)
        {
            return infoDao.InsertNxMms(mms);
        }

        public NxMms GetNxMmsById(int mmsId)
        {
            return infoDao.GetNxMmsById(mmsId);
        }

        public bool UpdateNxMms(NxMms mms)
        {
            return infoDao.UpdateNxMms(mms);
        }

        public bool DeleteNxMms(int mmsId)
        {
            return infoDao.DeleteNxMms(mmsId);
        }


        public IList<NxMms> GetNxMmsCollection(int projectId)
        {
            return infoDao.GetNxMmsCollection(projectId);
        }

        public NxMms GetNxMmsByPage(int projectId, int mmsPage)
        {
            return infoDao.GetNxMmsByPage(projectId, mmsPage);
        }

        #endregion
    }
}
